import request from '@/utils/request'

/**供应商SKU多图上传 */
export function uploadSkuBatchImages(data, skuId, type) {
    return request({
        url: `/system/oss/saveSkuBatchImages?type=${type}`,
        method: 'post',
        data,
        headers: { 'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundary7TMYhSONfkAM2z3a', 'timeout': 20000 },
        repetitiveConfig: {
            neglectful: true,
            interval: 3000
        },
    })
}

/**查询SKU上传参考图片（供应商、卖家） */
export function getSkuBatchImages(params) {
    return request({
        url: `/distribution/skuDistributor/getSkuBatchImages`,
        method: 'get',
        params,
    })
}

/**批量删除-供应商SKU详情图片 */
export function skuDistributor(params) {
    return request({
        url: `/distribution/skuDistributor/${params}`,
        method: 'delete',
    })
}